package com.yn.module.spider.utils;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;

import java.util.Map;

public class HttpUtils {
    /**
     * post请求
     *
     * @param params 请求参数
     * @return
     */
    public String postQuery(String url, Map<String, Object> params) throws Exception {
        HttpRequest req = HttpUtil.createPost(url);
        req.form(params);
        String body = req.execute().body();
        return body;
    }
}
